package updater;

import gazzera.swing.utility.*;
import gazzera.utils.*;

import java.awt.event.*;

import javax.swing.*;

public class GazzeraUpdater  extends JFrame{

	public GazzeraUpdater()
	{
		super("Gazzera Updater");
		setUndecorated(true);
		setIconImage(new ImageIcon(ResourceLoader.get("icon.png")).getImage());
		
		this.setSize(450, 300);

		Utils.center(this);
		this.addWindowListener(new WindowAdapter()
		{
			@Override
			public void windowClosing(WindowEvent e)
			{
				GazzeraUpdater.this.dispose();
			}
		});
		
		JLabel lbl = new JLabel(new ImageIcon(ResourceLoader.get("gazzera.png")));
		
		
		add(lbl);
		
		setVisible(true);
		
	}
	
	public static void main(final String[] args)
	{
		ResourceLoader.c = Thread.currentThread().getContextClassLoader();
		SwingUtilities.invokeLater(new Runnable()
		{

			@Override
			public void run()
			{
				try
				{
					UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());

					

					new GazzeraUpdater();
				}
				catch (Exception e)
				{
					JOptionPane.showMessageDialog(null, e.getMessage()+" "+Str.getStackTrace(e));
				}
			}
		});
	}
}
